﻿using BigEgg.Framework.Applications.ViewModels;
using BigEgg.Framework.Foundation;
using System.ComponentModel;

namespace FMStudio.Documents.TemplateDocument.Models
{
    public class Item : DataModel, IDataErrorInfo
    {
        /// <summary>
        /// The instance of a <see cref="DataErrorInfoSupport"/>
        /// </summary>
        protected readonly DataErrorInfoSupport dataErrorInfoSupport;


        public Item()
        {
            this.dataErrorInfoSupport = new DataErrorInfoSupport(this);
        }


        string IDataErrorInfo.Error { get { return this.dataErrorInfoSupport.Error; } }

        string IDataErrorInfo.this[string columnName] { get { return this.dataErrorInfoSupport[columnName]; } }
    }
}
